<h1>Editing <%= @user.name %></h1>
<% form_for(@user, :url=>{:action=>'update'}) do |u| %>
  <div id="edit_user">
    <p><b>Name</b><br /><%= u.text_field :name, :class => "textInput" %> </p>
    <% if is_admin(session[:user_id]) %>
      <p>
        <strong>User Level</strong>
        <br/>
        <select name="user[user_level_id]" class="textInput">
          <% @user_levels.each do |ul| %>
            <% if @user.user_level_id == ul.id %>
              <option selected="selected" value="<%= ul.id %>"><%= ul.name %></option>
            <% else %>
              <option value="<%= ul.id %>"><%= ul.name %></option>
            <% end %>
          <% end %>
        </select>
      </p>
    <% end %>
    <p><strong>Password</strong><br /><%= u.password_field :password, :class => "textInput" %> </p>
    <p><strong>Email</strong><br /><%= u.text_field :email, :class => "textInput" %> </p>
    <p><strong>Signature</strong><br /><%= u.text_field :signature, :class => "signature" %> </p>
    <p><br /><%= u.submit "Update", :class => "button" %> </p>
  </div>
  <a href="/users/" class="button">All Users</a>
<% end %>